import { Directive, DirectiveBinding } from "vue";
import { ElTable, ElTableColumn } from "element-plus";
export const adaptive: Directive = {
  mounted(el: HTMLElement, binding: DirectiveBinding) {
    const height =
      window.innerHeight - el.getBoundingClientRect().top - binding.value;
    el.style.height = height + "px";
    window.addEventListener("resize", () => {
      const height =
        window.innerHeight - el.getBoundingClientRect().top - binding.value;
      el.style.height = height + "px";
    });
  },
};
